<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
	<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" />  
	<link href="<%=basePath %>ajaxFramework/ext-2.1/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/ext-all.js"></script>
    <script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/source/locale/ext-lang-zh_CN.js"></script>
	<script type="text/javascript" src="<%=basePath %>My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="<%=basePath %>ajaxFramework/jQuery/jquery.js"></script>
	
<script type="text/javascript">
		function isEmpty(str){
			if(str==null || str.length==0) return true;
			else 
			return false;
		}
		function formSubmit(){
			if(!/^[2-9][0-9]{3}$/.test($("#yearNO").val())) 
			{
				Ext.MessageBox.alert('提示', '请输入正确的查询年限,如2012!');
				return false;
			}
			if(!isEmpty($("#beginNO").val())){
				if(!/^[1-9][0-9]*$/.test($("#beginNO").val())) 
				{
					Ext.MessageBox.alert('提示', '请输入正确的起始发文号,只能为数字!');
					return false;
				}
			}
			if(!isEmpty($("#endNO").val())){
				if(!/^[1-9][0-9]*$/.test($("#endNO").val())) 
				{
					Ext.MessageBox.alert('提示', '请输入正确的结束发文号,只能为数字!');
					return false;
				}
			}
			window.location.href = '<%=basePath %>documentationflow/xingzhengfawen/dengjibuSearchList.jsp?yearNO='+$("#yearNO").val()+'&beginNO='+$("#beginNO").val()+'&endNO='+$("#endNO").val();
		}
	 	window.onload = function(){
			var tb = new Ext.Toolbar(
				{
					height:25
				}
			);
		
		    tb.render('menu');
			tb.add(
		    {
		            text:'行政发文登记簿查询',
		            iconCls: 'daohang'
		    }
		    );
		}
</script>
  </head>
  
  <body>
<div id="right" style="z-index: 19; height: 98%">
	<div id="menu" style="padding-top: 4px;"></div>
		<form action="" name="searchForm" method="post">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
			<tr>
				<td width="100%" valign="top" height="100%">
					<div class="contab" style="height: 90%; width: 99%">
						<table class="p_06" width="100%" border="0" cellspacing="0" id="mytable">
							<tr>
								<td colspan="4">
									请输入查询条件
								</td>
							</tr>
          					<tr>
					            <td style="text-align:right">年份:&nbsp;&nbsp;<input id="yearNO" name="yearNO" size="40"/></td>
					            <td>&nbsp;</td>
					          </tr>
          					<tr>
					            <td style="text-align:right">起始发文号:&nbsp;&nbsp;<input id="beginNO" name="beginNO" size="40"/></td>
					            <td style="text-align:left">&nbsp;&nbsp;结束发文号:&nbsp;&nbsp;<input id="endNO" name="endNO" size="40"/></td>
					          </tr>
					          <tr>
					            <td align="center" colspan="4"><button name="choiceFlow" onclick="formSubmit();">查询</button></td>
					          </tr>
					        </table>
					</div>
					</td>
					</tr>
					</table>
</form>
  </body>
</html>
